<section class="aminui-wrapper">
    <div v-if="!ismobile" class="aminui-side-split">
        <div class="aminui-side-split-top">
            <a aria-current="page" href="/" class="router-link-active router-link-exact-active">
                {if sysconf('site_icon')}
                <img class="logo" title="{:sysconf('app_name')}" src="{:sysconf('site_icon')}" />
                {else}
                <img class="logo" title="{:sysconf('app_name')}" src="__ROOT__/static/theme/img/logo.png" />
                {/if}
            </a>
        </div>
        <div class="adminui-side-split-scroll">
            <el-scrollbar>
                <ul>
                    <li v-for="item in menu" :key="item" :class="pmenu.id==item.id?'active':''" @click="showMenu(item)">
                        <el-icon v-if="item.icon"><component :is="item.icon"/></el-icon>
                        <span slot="title">{{ item.title }}</span>
                    </li>
                </ul>
            </el-scrollbar>
        </div>
    </div>
    <div v-if="!ismobile" :class="menuIsCollapse?'aminui-side isCollapse':'aminui-side'">
        <div v-if="!menuIsCollapse" class="adminui-side-top">
            <h2>{{ pmenu.title }}</h2>
        </div>
        <div class="adminui-side-scroll">
            <el-scrollbar>
                <el-menu :default-active="active" :collapse="menuIsCollapse" :unique-opened="MENU_UNIQUE_OPENED">
                    <div v-if="nextMenu.length<=0" style="padding:20px;">
                        <el-alert title="无子集菜单" center type="info" :closable="false"></el-alert>
                    </div>
                    <template v-for="navMenu in nextMenu" v-bind:key="navMenu">
                        <el-menu-item v-if="!hasChildren(navMenu)" :index="String(navMenu.id)">
                            <template #title>
                                <el-icon v-if="navMenu.icon"><component :is="navMenu.icon"/></el-icon>
                                <span>{{navMenu.title}}</span>
                            </template>
                        </el-menu-item>
                        <el-sub-menu v-else :index="String(navMenu.id)">
                            <template #title>
                                <el-icon v-if="navMenu.icon"><component :is="navMenu.icon"/></el-icon>
                                <span>{{navMenu.title}}</span>
                            </template>
                            <el-menu-item v-for="subMenu in navMenu.sub" :index="String(subMenu.id)" @click="showMain(subMenu)">
                                <template #title>
                                    <el-icon v-if="subMenu.icon"><component :is="subMenu.icon"/></el-icon>
                                    <span>{{subMenu.title}}</span>
                                </template>
                            </el-menu-item>
                        </el-sub-menu>
                    </template>
                </el-menu>
            </el-scrollbar>
        </div>
        <div class="adminui-side-bottom" @click="menuIsCollapse = !menuIsCollapse">
            <el-icon v-if="menuIsCollapse"><expand /> </el-icon>
            <el-icon v-else><fold /></el-icon>
        </div>
    </div>
    <div class="aminui-body el-container">
        <div class="adminui-topbar">
            <div class="left-panel">
                <el-breadcrumb separator-icon="el-icon-arrow-right" class="hidden-sm-and-down"></el-breadcrumb>
            </div>
            <div class="center-panel"></div>
            <div class="right-panel">
                {include file="index/index-userbar"}
            </div>
        </div>
        <div class="adminui-main" id="adminui-main" style="overflow:hidden;">
            <template v-if="!ismobile">{include file="index/index-topbar"}</template>
            <iframe class="adminui-iframe" :src="path"></iframe>
        </div>
    </div>
</section>